{{--用于网页调用，判断是否有客户端身份，若没有则调用客户端登录--}}

<script language="JavaScript">
    var u = navigator.userAgent;

    var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端


    function _onQuickWebMobileNative()
    {

        if(undefined == window._quickWebMobileNative) return;

        var result = window._quickWebMobileNative.retrieve(api.__secretId);
    }

    var api = api || {

            __secretId : '',

            createSecretId : function()

            {
                if(undefined == window._quickWebMobileNative) return;
                api.__secretId = window._quickWebMobileNative.createSecretId();

            },

            getLoginToken : function(url)
            {
                if (!isiOS){
                    window.location.href = url;
                }

                if(undefined == window._quickWebMobileNative) return undefined;
                var res = window._quickWebMobileNative.exec(api.__secretId, "account", "102",'callbackid','');
                var array = JSON.parse(res);
                var dict = array[0];


                if (dict.result.length < 1 ){
                    window._quickWebMobileNative.exec(api.__secretId,"account",'100','9028','');
                }else {
                    window.location.href = url;
                }
            },

        };
</script>